<?php
if (!defined('IN_XLP')) {
    exit('Access Denied');
}
$Document = array(
    'pageid' => 'index-game', //页面标示
    'pagename' => '', //当前页面名称
    'mycss' => array('mobile/style'), //加载的css样式表
    'myjs' => array('global/jquery-1.9.0.min'), //加载的js脚本
    'footerjs'=>array(),
    'head'=>true//是否加载头部文件
);
include getTpl('header', 'public');
?>
<body>
<div class="search">
    <input type="text"/>
</div>
<div class="spell">
    <b class="hot"></b>
    <?php foreach ($letters as $k => $v): ?>
        <?php if(isset($games[$v]) && $games[$v]){ ?>
            <a><?php echo $v; ?></a>
        <?php } ?>
    <?php endforeach ?>
</div>
<div class="g_list">
   <h2>
      <b class="hot"></b>
       热门游戏
   </h2>
    <ul>
        <?php foreach ($games['hot'] as $key => $vo): ?>
            <a href="<?php echo U('index/area',array('gid'=>$vo['id'],'sign'=>$_GET['sign'])) ?>">
                <li>
                    <div>
                        <img src="<?php echo IMG_PATH ?>mobile/games/<?php echo $vo['abridge'] ?>.png"/>
                    </div>
                    <?php echo $vo['name'] ?>
                </li>
            </a>
        <?php endforeach ?>
    </ul>
</div>
<?php unset($games['hot']);?>
<?php foreach ($games as $k => $v): ?>
    <?php if(isHave($v)){ ?>
        <div class="g_list">
            <h2><b></b><?php echo $k ?></h2>
            <ul>
                <?php foreach ($v as $_game): ?>
                    <a href="<?php echo U('index/area',array('gid'=>$_game['id'],'sign'=>$_GET['sign'])) ?>">
                        <li>
                            <div>
                                <img src="<?php echo IMG_PATH ?>mobile/games/<?php echo $_game['abridge'] ?>.png"/>
                            </div>
                            <?php echo $_game['name'] ?>
                        </li>
                    </a>
                <?php endforeach ?>
            </ul>
        </div>
    <?php } ?>
<?php endforeach ?>
</body>
</html>